modification in controller after 2nd code reviews