Problems 4 and 6 solved