Added timeout method just to make it a bit clearer what's going on.