add truncate

This PR adds the truncate call.