Implementation with timeout