parser.js preliminary version (to finish)