Implmented search functionality