Castle is consulted by Detective Beckett of the NYPD when two victims are murdered in the style of two deaths portrayed in his novels, Hell Hath No Fury and Flowers for Your Grave respectively. Though Beckett wants Castle's access to the case limited, Castle repeatedly defies her instructions in order to see the handiwork of his copycat. Unsatisfied with what he considers a boring resolution to the case, Castle convinces Beckett to continue the investigation, and winds up discovering deeper layers to the crime. While the murders initially appeared to have been committed by the mentally ill client of a social worker who was one of the victims, Castle notes that the murderer did not duplicate the crimes exactly, eliminating the possibility that he was a deranged fan. He realizes that the killer was actually the social worker's brother attempting to frame her client, so that he could inherit his father's money after his death (his father suffering from terminal cancer). By the end of the pilot, Castle enters into a working relationship with Beckett under the pretense of conducting research for his new series of "Nikki Heat" novels. This relationship is often strained by Castle's luck in personally encountering the suspects, and sneaking in behind breaching teams even after Beckett has ordered him to remain behind; his attempts to follow them once allowing a suspect a chance to escape (although in Castle's defense this was merely because his ex-wife called him on his cell phone during the stake-out rather than any mistakes on his part). Despite this, Castle's familiarity with numerous obscure subjects often gives breakthroughs. His career yields many contacts, including a CIA agent willing to break Agency protocol by telling Castle and Beckett that their current victim was not a CIA agent. Although he is a proficient marksman (secret until Beckett bets with him on the practice range), he works the cases wholly unarmed (with a few rare, isolated exceptions). While his status as a consultant generally allows him to participate in the 'fun' parts of detective work without worrying about the more tedious details such as paperwork, the team puts him in situations where the criminals request no police involvement, such as to drop off a ransom. Castle still requires official police authority to request information from various sources, and can only question witnesses under supervision. Beckett often steps in to stop him becoming carried away