Added Patrick's changes