Only thing that I modified is that now it can get it's own pos data.
can use. with credit disclaimer: I did not steal anything from anybody okay