fixed bug and added documentation