implement rest with local storage