switched not name instead of len check