- javascript helper