lecture notes lua course, homework 2