forgot to replace a size() call using len() instead