added functionality to controllers and views