Hoo added in his changes on top of Sam's changes