Add timeout functional