retrieving data from factory with http