correct sp output method and test in diff cases