prelim format stuff, need to rewrite all of this