add arguments validation test & refactoring of position.