had variables flipped