lab 4. Closes #18