need -threaded for Repa examples
some refactorings