fixed simple hook handler implementation