solutions to the exercises