I spotted [your suggested edit](https://stackoverflow.com/review/suggested-edits/22310903) to the answer and rejected it. It appeared that your edit was trying to build on [the answer](https://stackoverflow.com/a/54882303/1364007) which [Dejan.S](https://stackoverflow.com/users/148601/dejan-s) posted to add more details.

In this instance, as you were making substantial changes I rejected your edit using the built-in reason

>This edit was intended to address the author of the post and makes no sense as an edit. It should have been written as a comment or an answer.

What I think you should have done in this instance was to post a new answer containing your edits (which I see that [you have done](https://stackoverflow.com/a/54883633/1364007)), but link to the original answer which you tried to edit so that Dejan.S still gets credit for helping you to get to your answer.

See, e.g. "[*Is it appropriate to edit best answer's solution with improvement or add another answer?*](https://meta.stackexchange.com/q/145559/284827)" - [the answer](https://meta.stackexchange.com/a/145562/284827) by [Servy](https://meta.stackexchange.com/users/186381/servy) says (emphasis mine):

> **If you're going to make non-trivial changes to someone else's code you really shouldn't edit their answer**. If they just left off a parenthesis or semicolon then feel free to edit it in, but if you're going to re-structure it, change the coding style, or "improve" it in any way that you feel is meaningful, (and the post isn't already community wiki) then an edit would be in appropriate. If you just want to point out that something won't work, or that it could be improved, then a comment would be fine.

> **If the changes are significant enough that it couldn't reasonably fit into a comment, then chances are it's significant enough that you should be posting another answer.**

>**Make sure that if you're posting an answer that's based on someone else's code you link to that answer and attribute the original author as appropriate.**