added code version 1.2