changed the model for simpelere fucntioning and better performance