more clean up still not perfect