add relay functionality