little modify
reduce code, little modify