moving some elasticnetwork code to c++
reducing print statements for XLs