adding v1.2 of the code