the javascript shit is almost working