working function pointer queue