 			@server.biom.remove(results[0].id).done () =>
 				results.splice(0,1)
 				location.reload(true);
-				
+
 window.readFile = readFile

				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]


	# store new biom file to the browser indexeddb
	readBlob: (file) =>
		reader.onloadend = (evt) =>
			if evt.target.readyState == FileReader.DONE
				# JSON.parse(reader.result)
				biomToStore = {}
