Add turrent class and some needed functions