[IMP]: improve code for model, view and controller