Marijuana contains chemicals that bind to specific sites in the brain and on the nerves. People typically use 65 to 195 mg of cannabis for smoking when using marijuana for medical reasons. So, 5 grams is many times more than the recommended medical dose.
Marijuana can cause impaired mental functioning, panic reactions, hallucinations, flashbacks, or depression. I'd suggest that if you are still experiencing symptoms, you seek help from a doctor.