improve code format