Exercsie6 modified