added helpful documentation within the code