parser with valid range