implemented new model code for basic commands