added done method for promise