getting table to work and random javascript