improve code

improve code