revised based on Mark's comments from 2013/11/30