updated with deferreds