update source code to new design