Made script for aggregate and gplot