improved comparison