Removed unessesary extra counting. Adding method documentation.