This seems like a lot of code for a simple comparison. Is this method really needed?