complex clean up