compiling, working, fast

to do: replace repcolvec and reprowvec w repcol and reprow