equals method overridden

overridden equals method to enables objects comparing.