threads are now working - with function pointers!