added offline and online tests