almost working :javascript block