flipped vars to get it right