added sample function