refactor, cleanup