exposed len, removed test code