add support for headless execution