refactor computeTable function
add underscore.js library