fixing things, added documentation