many new code from etienne