testing passing function to worker