major structure changes but its working a lot better