add more documentation to the code