lab 4. Closes #9