added some classes and some public functions