now do function can get PKey from server