more clean up
refactor and clean up