change sample method