function 6 rechecked

function 3 still has problem