some test code when I read programming books