new1 code : work in progress