refs #8 phew lots of changes