First attempt to make it work offline