total code revision and update