Added in Gavin's changes