added the part about localStorage