added js to function
figuring out the display table function