fixed & added documentation