changed function, now its count numbers