refactoring `size`