ADD: working HW1 solution