restructure sourcecode