better calling convention for frontend functions