more shitty code for timeouts; doesn't really do what i want yet