finished the second version