add function error and change style formatting in maincore