updates to defer() code