fixed a minor bug in parser and added demo script and db