implement basic searching : extremely buggy be warned