added checks for classes if not exist