moved actions to the directive