Fixed the class AGAIN and speed it up