corrected proof of online algorithm