added psuedocode for controller and view