using defereds for trapping fail()