Merged Carl's changes in