move validation to separate file