new code restructure