improved testing, fixed parser