Added more implementation for searching