added some comments for debugging