refactor sequence point logic