Fixed endtime of groups(for groups of 2)
Added legend