Almost completed Lab 4 for CS380