add some validation, approach IO