I think I also gave you some code which does this, did you look at it? Is there a reason why it wasn’t helpful?
It’s hard for anyone to help you unless you give enough details about the difficulty you are having for us to understand what is going on.
And when we do try to help you we need to know whether you find the information useful, and if not why not, so we can improve the help we are trying to give.
At the moment it is hard to help because we don’t know what the problem is or why what we’ve offered was not helpful so I encourage you to give more relevant information when you ask us to help.