Init code by ducthang