improve documentation to make code easier to understand