adding js the proper way