BROOKLYN - The man accused of viciously stabbing two children in an elevator and killing one of them was in court Friday afternoon to be assigned an attorney.

Police believe Daniel St. Hubert, 27, killed Prince Joshua Avitto, 6, and badly injured his friend, Mikayla Capers. Avitto's funeral was held today at the Saint Paul's Community Baptist Church in East New York.

St. Hubert is facing a litany of charges for allegedly stabbing two children, one of them fatally, in an East New York elevator. Among the charges the suspect faces are second-degree murder, attempted murder and assault.

Detectives are investigating whether he is linked to two other stabbings, one that injured a man in Chelsea on Wednesday and another that killed 18-year-old Tanaya Grant Copeland just blocks from where the two children were stabbed.

Since St. Hubert's arrest, new details have come to light about his state of mind. The suspect reportedly struggles with mental illness. His attorney spoke briefly to reporters, but said he hasn't had a chance yet to speak in-depth with St. Hubert.

St. Hubert is due back in court next Wednesday.