refactor the Spider.