change char to int for action parameter in recorder::rec