improve code structures