refactored digit action