now exposing sample function for bart