moving actions to lib