added some explanitory comments