mostly done, still testing to do and verify how to free memory from cdll