extract number processing into method