Cleaned up hw5_ex3, hw5_ex4