dict hack to get length