Using executor service to manage threads