Changed parameter name from p to piece.