handles both