add preliminairy offline support