solutions to set 1, problems 1 & 2