added error and success functions