utils for js