move all actions to one place
handle dir changes better