add support for localStorage