Exercise solution fixed