Funcion complete with replace
Final Submission