added search function to map