modified answer in challenge