lab 4. Closes #8