refactoring bits