new method to flip size and height