better (and prettier) use of service functions