Recovered Minar's Function from commit 1016d5e8624a9aa984691406bb51f137c78316bd