Encapsulating Roberto's code to support port features