improve assertion