using size instead of count