worked the javascript; doubling bug for some reason