formated core code
fixed merge conflict