added method for port checking