Refactoring code, and Implementation test Lei 4320