Before converting to armadillo
Armadillo conversion