sizeof refactoring