hw04 Programs 1 and 2