move common method to cacto