OK that seems to be even more complicated than i expected. It sounds like a good topic for a master work?