basic code for spider