adding sanity check code to find bugs, found them