started implementing relay functionality