more refactor :P