parallel engine still not working
updated so that single threaded is using pointers
parallel gradient finally works