initial version of parsing in python