added Len() with mutex