An existence theory for group divisible designs