edited exception message, simplified equals method