 	# @return {String} id The new notebook id
 	###
 	createNotebook: (name) ->
-		id = generateUid()
+		id = @generateUid()
 
 		# there's a 16^16 chance of conflicting, but hey
 		while fs.existsSync(path.join(@notebookdir, id  + ".json"))
-			id = generateUid()
+			id = @generateUid()
 
 		fs.writeFile path.join(@notebookdir, id + ".json"),
 			JSON.stringify {

	# @return {String} id The new note id
	###
	createNote: (name, notebook, content) ->
		id = generateUid()

		while fs.existsSync(path.join(@notebookdir, notebook + "." + id  + ".noted"))
			id = generateUid()

		fs.writeFile path.join(@notebookdir, notebook + "." + id  + ".noted"),
			JSON.stringify {

	###
	deleteNote: (id) ->
		fs.unlink path.join(@notebookdir, @filenameNote(id))

module.exports = noteddb
