make code more concise by initializing Vector of stackpanes