refactor: introduce len