GetSample rewrite