my solutions to exercise problem from rally