changed inline function to regular function

I hope regular C functions work. Let me know if I need to change it to an objective-c class method