replace size with length,

size deprecated