added extra validation