use new joi features