Half working search function