 			@listRecentFiles()
 		)
 
-		document.querySelector('#parse').addEventListener('click', (evt) => 
+		document.querySelector('#parse').addEventListener('click', (evt) =>
 			if evt.target.tagName.toLowerCase() == 'button'
 				files = document.getElementById('files').files
 				@checkFile(files)

				biomToStore.date = d.getUTCFullYear() + "-" + (d.getUTCMonth() + 1) + "-" + d.getUTCDate() + "T" + d.getUTCHours() + ":" + d.getUTCMinutes() + ":" + d.getUTCSeconds() + " UTC"
				console.log @
				if JSON.parse(biomToStore.data).format.indexOf("Biological Observation Matrix") != -1
					@server.biom.add(biomToStore).done (item) => 
						@currentData = item
						setTimeout( "window.location.href = 'preview.html'", 2000)
				else 
					alert "Incorrect biom format field! Please check your file content!"
		reader.readAsBinaryString(file)

	# list 10 most recent files uploaded to this browser
	listRecentFiles: () => 
		@server.biom.query().all().execute().done (results) =>
			if results.length > 0
				for p in [0..results.length-1]

		# load test file
		document.getElementById('loadTestFile').addEventListener('click', (evt) =>
			$('#loadTestFile').html('loading...&nbsp;&nbsp;<i class="icon-spinner icon-spin icon-large"></i>');
			hostURL = window.location.protocol + '//' + window.location.host + window.location.pathname.substr(0, window.location.pathname.lastIndexOf('/'))
			testfile = hostURL + '/data/testdata.biom'  ## Dev TODO http://phinch.org/data/testdata.biom
			$.get(testfile, (testdata) =>
				biomToStore = {}
				biomToStore.name = 'testdata.biom'
				biomToStore.size = 15427024
