using array instead of sets for json