added TimeOut feature & minor improvements