added template comments for debugging