added self-defined exception,fixed some syntax error,but to be continue