before fixin Undefined by localstorage