A mathematical model for HIV drug resistance