Implemented get-state command.