cleanups and more func is generated