a few more structural changes
some changes
merged marcus change