added documentation, small corrections