restructured to more sane structure