changed empty list handling fromnull to 0size