added unit testing from lewicki