[yanan] fix the code to make it easy read