assignment5 modified