more refactoring
getting closer