added support of localStorage