size -> num
refactored