portmap - added function implementation