converted javascript to use strict