added documentation in comments