First part of assignment 9