add SAM conversions
finished chap12