added a core state and function pass for timeouts and tweaked some examples