Updated to include changes from pull req 12