move 'use strict' to the top of resource function (strict mode doesn't apply otherwise)