swaped the order to call an action, to action.type