Changed to allow testing of goal hook.