added test for len and branch