changed update to flip