rename helper functions
refactor: get Map length