initial code, places search in API