rewritten lots of stuff