adding in some additional validation logic