move global param into local param to address issue #25