adding JW tests and fix