added last_migration function