fix the crawler function