Converted to obj-c 2.0