Add working search function