Created map and search function