moved reg func
removed param