adding a function that got lost in translation