refactor & add service