restructuring project, beware of debug mode, it totally doesn't work