Updated for Javascript tabulation