clean up some code again