Refactored to reuse code for each one/five/ten group