$mech is local variable no need to pass it to subs