[Chapter 6] smo helper functions