upgraded to v1.3 code