fixxed bug with swapped x & y