adding Registor to make more flexible