Some changes to Sample