added magic functions attach and detach to service abstrat