added random number generation based on c++11