small additions to the code