done with js the good part