Added Validation and logic for spider