Thank you very much, Slin!
By reading through the code of the demo i was able to get it working.