Added flipAll() utility fucntion and UnitTests for the same