solutions for some exercises