Not mutating the input has a knock on effect on functionality - fix that