added hooks to query
added service