bugged commit 2 (implemented replace)