commented reference code