refactoring, using a http service to load data from json