creates action and view for index