improve code arch