refactor instance into service/