adding in factories and uniqueness validator