- fixed some bugs with metrics calculation
- added comments for new code