refactored digits product block