Adding function that was accidentally deleted in the previous merge