major refactore so that each command supports multiple expect patterns which are stored for later retrival