few changes documenting the code