updated for smartypants 1.8.0+