working getClass equals