added some explaining comments