initial code for problems 1-17