befoer libRmath branch
before pulling rewrite
resolving conflicts
close thread librmath
added TODO