added handler in the view loader function