working on unit testing and documentation.