Merge in brian's changes'