simplify hook params, use hooks in local, improved tests