relay sketch reworked