adding can_migrate function