refactor and cleanup - part 3