fixed parser to allow for functions