refactoring process values in arduino