working
starting refactor
some updates