added some other stuff from the old CoralLib