Added sample parameter.