added documentation and how to implement a few functions