working search method to improve layout, first version