removed unwanted statements & added new statements in controller