added helper class and moved hook registration to it
improved tests and include helper