reg handler improved