refactor to make use of storageService