Reimplement sampleCode using SKRJ basis from pomagma