unify variables
use perl style function argument passing