add checkService, etc. and bugfixed