continued restructure of code