Scientists crack how to cook the perfect egg