applied HW V3 debug result, many modifications to V3.1
