restructure a bit