code update from legacy code