Fixed error in extract function. arrays are now no long dereferenced in function calls as they are already pointers.