helper functions js file for knowitall client