improve testing and documentation