using class_exists() instead of checking file exists