Call the right rem function