added local storage code, V1.4
removed comments V1.4.1