Implement search and resolve #1