Review code of recording instruction in order to make it work with gui
implementation