sample code for the DP course