use dict for size