cleaned up port value functionality