moved from vectors to boost::matrix, performance +25%