parameterize division function