diff --git a/sequence_extractor/exon_concatenation.py b/sequence_extractor/exon_concatenation.py
index c5348ac1542304c2246ec4df4036a9fe99ac1d69..ccc01035fbd08236228178663c8a28b663c5213c 100644
--- a/sequence_extractor/exon_concatenation.py
+++ b/sequence_extractor/exon_concatenation.py
@@ -1,6 +1,7 @@
-def exon_concatenation:
-	fa = open("fasta.fa",'r')
+def exon_concatenation(filename):
+	fa = open(filename,'r')
 	lines = fa.readlines()
+	to_write_to_file = []
 	for x in range(int(len(lines)/2)):
 		if x == 0:
 			annotation = lines[0]
@@ -9,5 +10,10 @@ def exon_concatenation:
 			if lines[2*x] == lines[2*(x-1)]:
 				read+= lines[(2*x)+1]
 			else:
+				to_write_to_file.append(annotation)
+				to_write_to_file.append(read)
 				annotation = lines[2*x]
 				read = lines[(2*x)+1]
+	to_write_to_file.append(annotation)
+	to_write_to_file.append(read)
+	return to_write_to_file
\ No newline at end of file