move the script into a Parser class