Solved the first two problems of ps7