some code for Programming_Pearls