adding warning if the value is outside the range