some refactoring quantum