Code from my Engr 101 class. Do not plagiarize!