clean up, began refactor