restructured a bit