still doing search function using database