added array length check for splitting users