improve codes
improve some codes