rename var to a proper name
rename var & use id in array enumeration
use condensed tertiary operator syntax
unit test for returning nil in an array not containing the given object