re-org of code