add new features to define non-standard port and force standard port