should go in js/lib