arg reading refactoring