Input data validation added