added better docs and unit tests