the source code of the 2 problems