cleanup, addpreamble