building function with the minaret