fixed all bugs and search. ready for more testing