Merged Bruce's changes