added some better comments