updated with ability to capture by hostname