Documentation

added comments for some of the code I wrote