removed useless 'cnt' var