optimise event insertion