updated hook to probably read the post data