fix typo - len to pos
 change argument types for consistent.