refactor story map functions.