adding data validation and checks