created search method and converted some tabs to spaces per PEP-8