udpated the logic behind taking into account flex guest migration more efficiently, added todos