move registrator to constructor.