Adding more validation logic