replace string_at with the slice operator