improve service detection