added sample and values functions