Most of the way through implimenting question 1