Updated to use 'len' as a preferred variable name