refactor to call sml-mark-function directly