Edited the class to avoid duplicate classes