trying to make usable from c# too