modified signing structure, added test for timeout dection