define service using variable