improve code structure
improve code structure