Replaced setKey by pair