profiling utitlity function
 rebuilt js