applied new model and implemented some functions