patrick's independent code