new script for pose sampling