added support for remembering the last executed command