modified names to meet assignment specifications
completed processCommand