add offline functionality