add custom port handling