changes done according to unbind but with comments