p1_6 correction

add the return matrix for the test
corrrection of p1_6