improve code