adding action and method to view