changed equality check to 'continue' from 'pass'  -saves 'num' steps