add pre() and a test for it