Adding function replace spaces