added initial documentation (modified from previous major work)