implement search
fix merge conflicts