added validation and strip http