Introducing median for same timestamp

Signed-off-by: oleg komarov <o.komarov11@imperial.ac.uk>