adding solutions for problems #1, #17 from HW #4