online offline logic seems to work fine. need to complete offline logic so that multiplr window problem is solved