refactors equality and comparable into comparison; adds addition for int types