added method to get port