my std js functions