added some comments/documentation