moved 'strict mode' under function