forked from [github.com/johnfmarkham/mats]