prepare for code optimization and cleanup