Done adding func, moving onto seg faults.