Solution for 2 modified