created flask search functionality