added stuarts changes to delay and fixed all of the commit differences