added some comments for documentation purposes