populates javascript table with data