added additional checks to prevent users from using inappropriate data partitions