refactor, clean up