test code and fix