added some more code documentation