added method to set success, error and complete allbacks