adding original implementation