added unit testing, fixed path