adding completed versions of problems 1, 2 & 3