adding in some validation