wrote edges code
wrote time thread