Added equal functions and test for them