began refactor
more refactor stuff