added validation and port/ip