fixes and documentation