added task#3 from HW #1