Add abbility to specify optional pre_ and post_fun