changed implementation of health check