transform samples