swapped arguments which gave strange output