Implemented timeout. Probably the final commit