added functioning permenant storage