I updated my code a little

can you check the comment if this is what you mean.