[r] refactor code
[f] Add suspend and reactivate function