converted from http://bitbucket.org/lindenlab/apiary/