Input Validation added