moved \'use strict\' statements to inside function scope