debug of typo in helper function