added 'use strict' and improve equality comparison