final version for aggregating r and phi

Signed-off-by: Nicholas Tan Jerome <nicholas.jerome@kit.edu>