add range validation