Solved problems 003 and 004 correctly.