changed use of 8 if statements into a vector which contains vectors for each chamber and view