correct mistake: pos was not in scope