much code fix, many test, very better