fixed bugs, added partial search (like a boss)