added documentation and design