solutions for the first 5 problems