added definitions for joi