lab 4. Closes #16