Added splitAt and replace