fix init function call, add load from localstorage