[REF] stock: some refactoring