api for search working but ugly