added fixes and sanity checks. something is still not right with the sada method