removing classes that should not be added