test logic