always move key and val to the such that expression