JSON loading + added groping function