modified task to include equals method