Updated sampling functions