solutions for exercise1