pulling in changes from cheeaun's master