add extensive documentation