checks output value now against the range; might cost a little bit performance but ensure correct output ranges