working with reg