pre code clean up