added mak-pair function