implemented exception handling for faulty inputed commands