create a generic remote function to execute them remotely

Signed-off-by: Alfredo Deza <alfredo@deza.pe>