added option to save output and to get a list of ids