defined an action for index, working on more