latest refactor
more refactor