reorganize data structure of RDD
use mocha and chai for unit test