added groupedByActivity csv file. also minor improvements in client code