simplification of postInsert/postUpdate code