more refactor stuff