Comparison made more efficent