updated for newer JS