separated hooks into pre and post