adding final touches, some tidying still to do