added nikhila's controller code that is working correctly that I will move into model