utility functions for javascript