corrected updates and equals method for Department