Added some functionallity, although I do not have tested.