Code workings for progfun-003