adding in validation and other things