working priority inversion, just need to fix it now