pre/postlink refactor