changing default js to use a lightweight function