merge of toddmm's changes to the master branch