Change method to get port