Create get_pin_from_num function