modified js to accomodate gbili js