first attempt at automatic discovery timer, seemes to be working well