switched the commandCOllection from an array to a Generic Stack