optimize for core code

optimize for core code