properly using prop object in search