made Port constructor a template