working version using mock data, instead of local storage.