allShared is declared twice - here and in line 43