added code documentation.