diff --git a/initial-reverse/reverse.c b/initial-reverse/reverse.c
index 6dee8f25b..3de6f77a2 100644
--- a/initial-reverse/reverse.c
+++ b/initial-reverse/reverse.c
@@ -38,8 +38,19 @@ void reverse_seekable(FILE *in, FILE *out, FILE *err) {
 	}
 }
 
+
 void reverse(FILE *in, FILE *out, FILE *err) {
-	fprintf(err, "TODO");
+	char *lines[10];
+	unsigned int num_lines = 0;
+	size_t line_len = 0;
+
+	while (getline(&lines[num_lines], &line_len, in) != -1) {
+		num_lines ++;
+	}
+
+	for (int i = 0; i < num_lines; i++) {
+		fprintf(out, lines[num_lines - i - 1]);
+	}
 }
 
 
diff --git a/initial-utilities/wgrep/wgrep.c b/initial-utilities/wgrep/wgrep.c
index 264e29ac0..e509ed03e 100644
--- a/initial-utilities/wgrep/wgrep.c
+++ b/initial-utilities/wgrep/wgrep.c
@@ -30,7 +30,7 @@ char *mystrstr(const char *haystack, const char *needle) {
 }
 
 
-void print_matches(FILE *input, char *searchterm) {
+void wgrep(FILE *input, char *searchterm) {
     char *line = NULL;
     size_t len = 0;
     bool read_successful = true;
@@ -47,7 +47,8 @@ void print_matches(FILE *input, char *searchterm) {
          * stdin would be acquired.  But what to feed to it to cause some
          * errors?
          */
-        perror("print_matches");
+	read_successful = false;
+        perror("wgrep");
     }
 
     free(line);
@@ -88,7 +89,7 @@ int main(int argc, char* argv[]) {
             return 1;
         }
 
-        print_matches(file, searchterm);
+        wgrep(file, searchterm);
 
         fclose(file);
     }