refactor to a modualrized migration using classes