changed NAMESPACE, added warp.sample function