tested with imreg