change timeout logic and start some server logic