attempt to solve seg faults