added some more detailed comments