using armadillo for algebra; serial solver implemented