adding offline callback