put validation feature creation in a separate function