added migration function