more test, debug details and delete some unused code