test pre-hook