added search function for bars