Replace prototype by implementation