refactor: service takes in one data object instead of several parameters