used boost::array for more clean code.