corrected flipping of parameters