added unit tests and implemented part of table search