added parseCommands for reading in text file and interpreting comands: