After trying to fix some things. Currently seg faults