Use reduce and length (more readable)