use std::vector<uint64> to manage storage. Make some global variable "constants" into macros. add swap()