allow JS functions to call previously defined functions