added initial code for telegraphandmain