Implemented an algorithm to render overlapping events