code refactored
improve startup time.