fix deprecated call to fromstring. added debug stmts