Input: hanwang - validate number of endpoints before using them