Solutions to exercises