adding unit testing; minor stuff