improved documentation of code