getting rid of weird artifacts in the class