replacing the code