extracted arg validator to a function