compilation of tutorial code in case for ref